package access;//: access/ChocolateChip2.java

import access.cookie2.Cookie;
//子类，不同包下
public class ChocolateChip2 extends Cookie {
  public ChocolateChip2() {
   System.out.println("ChocolateChip2 constructor");
  }
  public void chomp() {
    bite();
  } // Protected method，这里调用了父类的protected方法，
    // 如果将父类权限改为default，那么编译错误
  public static void main(String[] args) {
    ChocolateChip2 x = new ChocolateChip2();
    x.chomp();
  }
} /* Output:
Cookie constructor
ChocolateChip2 constructor
bite
*///:~
